import java.util.*;
public class TongnSoNguyenTo {
	int nguyento(int n)
	{
	    if(n==0||n==1) return 0;
	    for(int i=2;i<=(int)Math.sqrt(n);i++)
	        if(n%i==0)return 0;
	    return 1;  
	}
	int tongNsonguyento(int n)
	{
		int tong=0,i=0,j=2;
	    while(i<n)
	    {
	        if(nguyento(j)==1)
	        {
	            tong+=j;
	            i++;
	            j++;
	        }
	        
	    }
	    return tong;
	}
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		  TongnSoNguyenTo a=new TongnSoNguyenTo();
		  System.out.print(a.tongNsonguyento(2));
		//Thuy comment

	}

}
